package com.ctsi.ssdc.domain;

import com.ctsi.ssdc.annotation.AutoId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.ZonedDateTime;
import java.util.ArrayList;
import java.util.Arrays;

/**
 * @author ctsi-biyi-generator
*/
@ApiModel(description = "LitemallTopic")
public class LitemallTopic implements Serializable {
    /**
     * @Fields id 
     */
    @ApiModelProperty("")
    @AutoId(primaryKey = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Integer id;

    /**
     * @Fields title 专题标题
     */
    @ApiModelProperty("title")
    private String title;

    /**
     * @Fields subtitle 专题子标题
     */
    @ApiModelProperty("subtitle")
    private String subtitle;

    /**
     * @Fields price 专题相关商品最低价
     */
    @ApiModelProperty("price")
    private BigDecimal price;

    /**
     * @Fields readCount 专题阅读量
     */
    @ApiModelProperty("readCount")
    private String readCount;

    /**
     * @Fields picUrl 专题图片
     */
    @ApiModelProperty("picUrl")
    private String picUrl;

    /**
     * @Fields sortOrder 排序
     */
    @ApiModelProperty("sortOrder")
    private Integer sortOrder;

    /**
     * @Fields goods 专题相关商品，采用JSON数组格式
     */
    @ApiModelProperty("goods")
    private String goods;

    /**
     * @Fields addTime 创建时间
     */
    @ApiModelProperty("addTime")
    private ZonedDateTime addTime;

    /**
     * @Fields updateTime 更新时间
     */
    @ApiModelProperty("updateTime")
    private ZonedDateTime updateTime;

    /**
     * @Fields deleted 逻辑删除
     */
    @ApiModelProperty("deleted")
    private Boolean deleted;

    /**
     * @Fields content 专题内容，富文本格式
     */
    @ApiModelProperty("content")
    private String content;

    private static final long serialVersionUID = 1L;

    /** 
     * @return id 
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /** 
     * @return title 专题标题
     */
    public String getTitle() {
        return title;
    }

    /**
     * @param title 专题标题
     */
    public void setTitle(String title) {
        this.title = title == null ? null : title.trim();
    }

    /** 
     * @return subtitle 专题子标题
     */
    public String getSubtitle() {
        return subtitle;
    }

    /**
     * @param subtitle 专题子标题
     */
    public void setSubtitle(String subtitle) {
        this.subtitle = subtitle == null ? null : subtitle.trim();
    }

    /** 
     * @return price 专题相关商品最低价
     */
    public BigDecimal getPrice() {
        return price;
    }

    /**
     * @param price 专题相关商品最低价
     */
    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    /** 
     * @return read_count 专题阅读量
     */
    public String getReadCount() {
        return readCount;
    }

    /**
     * @param readCount 专题阅读量
     */
    public void setReadCount(String readCount) {
        this.readCount = readCount == null ? null : readCount.trim();
    }

    /** 
     * @return pic_url 专题图片
     */
    public String getPicUrl() {
        return picUrl;
    }

    /**
     * @param picUrl 专题图片
     */
    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl == null ? null : picUrl.trim();
    }

    /** 
     * @return sort_order 排序
     */
    public Integer getSortOrder() {
        return sortOrder;
    }

    /**
     * @param sortOrder 排序
     */
    public void setSortOrder(Integer sortOrder) {
        this.sortOrder = sortOrder;
    }

    /** 
     * @return goods 专题相关商品，采用JSON数组格式
     */
    public String getGoods() {
        return goods;
    }

    /**
     * @param goods 专题相关商品，采用JSON数组格式
     */
    public void setGoods(String goods) {
        this.goods = goods == null ? null : goods.trim();
    }

    /** 
     * @return add_time 创建时间
     */
    public ZonedDateTime getAddTime() {
        return addTime;
    }

    /**
     * @param addTime 创建时间
     */
    public void setAddTime(ZonedDateTime addTime) {
        this.addTime = addTime;
    }

    /** 
     * @return update_time 更新时间
     */
    public ZonedDateTime getUpdateTime() {
        return updateTime;
    }

    /**
     * @param updateTime 更新时间
     */
    public void setUpdateTime(ZonedDateTime updateTime) {
        this.updateTime = updateTime;
    }

    /** 
     * @return deleted 逻辑删除
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * @param deleted 逻辑删除
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    /** 
     * @return content 专题内容，富文本格式
     */
    public String getContent() {
        return content;
    }

    /**
     * @param content 专题内容，富文本格式
     */
    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LitemallTopic other = (LitemallTopic) that;
        return (this.getId() == null ? other.getId() == null :
				 this.getId().equals(other.getId()))
            && (this.getTitle() == null ? other.getTitle() == null :
				 this.getTitle().equals(other.getTitle()))
            && (this.getSubtitle() == null ? other.getSubtitle() == null :
				 this.getSubtitle().equals(other.getSubtitle()))
            && (this.getPrice() == null ? other.getPrice() == null :
				 this.getPrice().equals(other.getPrice()))
            && (this.getReadCount() == null ? other.getReadCount() == null :
				 this.getReadCount().equals(other.getReadCount()))
            && (this.getPicUrl() == null ? other.getPicUrl() == null :
				 this.getPicUrl().equals(other.getPicUrl()))
            && (this.getSortOrder() == null ? other.getSortOrder() == null :
				 this.getSortOrder().equals(other.getSortOrder()))
            && (this.getGoods() == null ? other.getGoods() == null :
				 this.getGoods().equals(other.getGoods()))
            && (this.getAddTime() == null ? other.getAddTime() == null :
				 this.getAddTime().equals(other.getAddTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null :
				 this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleted() == null ? other.getDeleted() == null :
				 this.getDeleted().equals(other.getDeleted()))
            && (this.getContent() == null ? other.getContent() == null :
				 this.getContent().equals(other.getContent()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getSubtitle() == null) ? 0 : getSubtitle().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getReadCount() == null) ? 0 : getReadCount().hashCode());
        result = prime * result + ((getPicUrl() == null) ? 0 : getPicUrl().hashCode());
        result = prime * result + ((getSortOrder() == null) ? 0 : getSortOrder().hashCode());
        result = prime * result + ((getGoods() == null) ? 0 : getGoods().hashCode());
        result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        return result;
    }


    /**
     * This enum was generated by MyBatis Generator.
     * This enum corresponds to the database table litemall_topic
     *
     * @mbg.generated
     */
    public enum Column {
        id("id", "id", "INTEGER", false),
        title("title", "title", "VARCHAR", false),
        subtitle("subtitle", "subtitle", "VARCHAR", false),
        price("price", "price", "DECIMAL", false),
        readCount("read_count", "readCount", "VARCHAR", false),
        picUrl("pic_url", "picUrl", "VARCHAR", false),
        sortOrder("sort_order", "sortOrder", "INTEGER", false),
        goods("goods", "goods", "VARCHAR", false),
        addTime("add_time", "addTime", "TIMESTAMP", false),
        updateTime("update_time", "updateTime", "TIMESTAMP", false),
        deleted("deleted", "deleted", "BIT", false),
        content("content", "content", "LONGVARCHAR", false);

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        private static final String BEGINNING_DELIMITER = "`";

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        private static final String ENDING_DELIMITER = "`";

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        private final String column;

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        private final boolean isColumnNameDelimited;

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        private final String javaProperty;

        /**
         * This field was generated by MyBatis Generator.
         * This field corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        private final String jdbcType;

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        public String value() {
            return this.column;
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        public String getValue() {
            return this.column;
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        public String getJavaProperty() {
            return this.javaProperty;
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        public String getJdbcType() {
            return this.jdbcType;
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
            this.column = column;
            this.javaProperty = javaProperty;
            this.jdbcType = jdbcType;
            this.isColumnNameDelimited = isColumnNameDelimited;
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        public String desc() {
            return this.getEscapedColumnName() + " DESC";
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        public String asc() {
            return this.getEscapedColumnName() + " ASC";
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        public static Column[] excludes(Column ... excludes) {
            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
            if (excludes != null && excludes.length > 0) {
                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
            }
            return columns.toArray(new Column[]{});
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        public String getEscapedColumnName() {
            if (this.isColumnNameDelimited) {
                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
            } else {
                return this.column;
            }
        }

        /**
         * This method was generated by MyBatis Generator.
         * This method corresponds to the database table litemall_topic
         *
         * @mbg.generated
         */
        public String getAliasedEscapedColumnName() {
            return this.getEscapedColumnName();
        }
    }
}